﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataLoader.UI.ViewModels;
using DataLoader.UI.Views;
using Microsoft.Practices.Unity;

namespace DataLoader.UI.Misc
{
    public class TypeContainer
    {
        private static IUnityContainer _container = null;

        public static void Register()
        {
            if (_container == null) { var regs = TypeContainer.Instance.Registrations; }       
           
            _container.RegisterType<MainViewModel, MainViewModel>(new InjectionConstructor());
        }


        public static IUnityContainer Instance
        {
            get
            {
                if (_container == null)
                    _container = new UnityContainer();

                return _container;
            }
        }
    }

}
